package com.nsgf.library.data.bean;

import com.nsgf.library.base.BaseApplication;
import com.nsgf.library.data.api.APIs;
import com.nsgf.library.utils.Kits;
import com.nsgf.library.utils.StringUtil;
import com.zhht.htzx.R;

import java.util.List;

public class PointListBean {
    /**
     * list : [{"id":0,"title":"","description":"","point":0,"createTime":"","tradeOrderResp":{"id":0,"no":"","type":0,"terminal":0,"userId":0,"userIp":"","userRemark":"","status":0,"productCount":0,"finishTime":"","cancelTime":"","cancelType":0,"remark":"","commentStatus":false,"payOrderId":0,"payStatus":false,"items":[{"id":0,"orderId":0,"spuId":0,"spuName":"","skuId":0,"picUrl":"","count":0,"commentStatus":false,"price":0,"payPrice":0,"afterSaleId":0,"afterSaleStatus":0}]},"haveOrder":false}]
     * total : 0
     */

    private int total;
    private List<ListBean> list;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean {

        private int id;
        private String title;
        private String description;
        private double point;
        private long createTime;
        private TradeOrderRespBean tradeOrderResp;
        private boolean haveOrder;
        private String nickname;

        private String userId;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public double getPoint() {
            return point;
        }

        public int getPointColor() {
            return point / 100 < 0 ? BaseApplication.getInstance().getColor(R.color.color_2CBC27) : BaseApplication.getInstance().getColor(R.color.color_EF4438);
        }

        public void setPoint(double point) {
            this.point = point;
        }

        public String getCreateTime() {
            return Kits.Date.getYmdhms(createTime);
        }

        public void setCreateTime(long createTime) {
            this.createTime = createTime;
        }

        public TradeOrderRespBean getTradeOrderResp() {
            return tradeOrderResp;
        }

        public void setTradeOrderResp(TradeOrderRespBean tradeOrderResp) {
            this.tradeOrderResp = tradeOrderResp;
        }

        public boolean isHaveOrder() {
            return haveOrder;
        }

        public void setHaveOrder(boolean haveOrder) {
            this.haveOrder = haveOrder;
        }

        public String getNickname() {
            if (StringUtil.isEmpty(nickname))
                return "";
            return "下单用户：" + nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getUserId() {
            if (StringUtil.isEmpty(userId))
                return "";
            return "ID:" + userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        public static class TradeOrderRespBean {
            /**
             * id : 0
             * no :
             * type : 0
             * terminal : 0
             * userId : 0
             * userIp :
             * userRemark :
             * status : 0
             * productCount : 0
             * finishTime :
             * cancelTime :
             * cancelType : 0
             * remark :
             * commentStatus : false
             * payOrderId : 0
             * payStatus : false
             * items : [{"id":0,"orderId":0,"spuId":0,"spuName":"","skuId":0,"picUrl":"","count":0,"commentStatus":false,"price":0,"payPrice":0,"afterSaleId":0,"afterSaleStatus":0}]
             */

            private int id;
            private String no;
            private int type;
            private int terminal;
            private int userId;
            private String userIp;
            private String userRemark;
            private int status;
            private int productCount;
            private String finishTime;
            private String cancelTime;
            private int cancelType;
            private String remark;
            private boolean commentStatus;
            private int payOrderId;
            private boolean payStatus;
            private List<ItemsBean> items;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getNoSrc() {
                return "订单号：" + no;
            }

            public void setNo(String no) {
                this.no = no;
            }

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }

            public int getTerminal() {
                return terminal;
            }

            public void setTerminal(int terminal) {
                this.terminal = terminal;
            }

            public int getUserId() {
                return userId;
            }

            public void setUserId(int userId) {
                this.userId = userId;
            }

            public String getUserIp() {
                return userIp;
            }

            public void setUserIp(String userIp) {
                this.userIp = userIp;
            }

            public String getUserRemark() {
                return userRemark;
            }

            public void setUserRemark(String userRemark) {
                this.userRemark = userRemark;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public int getProductCount() {
                return productCount;
            }

            public void setProductCount(int productCount) {
                this.productCount = productCount;
            }

            public String getFinishTime() {
                return finishTime;
            }

            public void setFinishTime(String finishTime) {
                this.finishTime = finishTime;
            }

            public String getCancelTime() {
                return cancelTime;
            }

            public void setCancelTime(String cancelTime) {
                this.cancelTime = cancelTime;
            }

            public int getCancelType() {
                return cancelType;
            }

            public void setCancelType(int cancelType) {
                this.cancelType = cancelType;
            }

            public String getRemark() {
                return remark;
            }

            public void setRemark(String remark) {
                this.remark = remark;
            }

            public boolean isCommentStatus() {
                return commentStatus;
            }

            public void setCommentStatus(boolean commentStatus) {
                this.commentStatus = commentStatus;
            }

            public int getPayOrderId() {
                return payOrderId;
            }

            public void setPayOrderId(int payOrderId) {
                this.payOrderId = payOrderId;
            }

            public boolean isPayStatus() {
                return payStatus;
            }

            public void setPayStatus(boolean payStatus) {
                this.payStatus = payStatus;
            }

            public List<ItemsBean> getItems() {
                return items;
            }

            public void setItems(List<ItemsBean> items) {
                this.items = items;
            }

            public static class ItemsBean {
                /**
                 * id : 0
                 * orderId : 0
                 * spuId : 0
                 * spuName :
                 * skuId : 0
                 * picUrl :
                 * count : 0
                 * commentStatus : false
                 * price : 0
                 * payPrice : 0
                 * afterSaleId : 0
                 * afterSaleStatus : 0
                 */

                private int id;
                private int orderId;
                private int spuId;
                private String spuName;
                private int skuId;
                private String picUrl;
                private int count;
                private boolean commentStatus;
                private double price;
                private double payPrice;
                private int afterSaleId;
                private int afterSaleStatus;

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public int getOrderId() {
                    return orderId;
                }

                public void setOrderId(int orderId) {
                    this.orderId = orderId;
                }

                public int getSpuId() {
                    return spuId;
                }

                public void setSpuId(int spuId) {
                    this.spuId = spuId;
                }

                public String getSpuName() {
                    return spuName;
                }

                public void setSpuName(String spuName) {
                    this.spuName = spuName;
                }

                public int getSkuId() {
                    return skuId;
                }

                public void setSkuId(int skuId) {
                    this.skuId = skuId;
                }

                public String getPicUrl() {
                    return picUrl;
                }

                public void setPicUrl(String picUrl) {
                    this.picUrl = picUrl;
                }

                public int getCount() {
                    return count;
                }

                public void setCount(int count) {
                    this.count = count;
                }

                public boolean isCommentStatus() {
                    return commentStatus;
                }

                public void setCommentStatus(boolean commentStatus) {
                    this.commentStatus = commentStatus;
                }

                public String getPrice() {
                    return "￥" + APIs.df.format(price / 100);
                }

                public void setPrice(double price) {
                    this.price = price;
                }

                public double getPayPrice() {
                    return payPrice;
                }

                public void setPayPrice(double payPrice) {
                    this.payPrice = payPrice;
                }

                public int getAfterSaleId() {
                    return afterSaleId;
                }

                public void setAfterSaleId(int afterSaleId) {
                    this.afterSaleId = afterSaleId;
                }

                public int getAfterSaleStatus() {
                    return afterSaleStatus;
                }

                public void setAfterSaleStatus(int afterSaleStatus) {
                    this.afterSaleStatus = afterSaleStatus;
                }
            }
        }
    }
}
